Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def rozdziel(x):
- tab = list(x)
- tab.append(" ")
- wynik = []
- s = 0
- for i in range(len(tab)):
- if tab[i] == " ":
- dodanie = ""
- for j in range(s, i, 1):
- dodanie += tab[j]
- if dodanie != "":
- wynik.append(dodanie)
- s = i+1
- return wynik
- slowo = str(input("slowo: "))
- print(rozdziel(slowo))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement