“Python tabeli śladu” Kod odpowiedzi

Tabela śladu Pythona

counter = 1
while counter < 11:
    print(counter, end = ‘ ‘)
    counter=(counter + 1)
Relieved Rhinoceros

Python tabeli śladu

var = '  this   is a test   '
 
word_counter = 0
 
start_status = True
 
for i in range(len(var)):
 
  if var[i] != ' ':
 
    if start_status == True:
 
      word_counter = word_counter + 1
 
      start_status = False
 
  if var[i]==' ':
 
    start_status = True
 print(word_counter)
Grieving Gecko

Odpowiedzi podobne do “Python tabeli śladu”

Pytania podobne do “Python tabeli śladu”

Więcej pokrewnych odpowiedzi na “Python tabeli śladu” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu