123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import random
- occurences = ["What are the demands","There are no demands","The demands","Impossible demands", "Impossible demand","We demand the impossible","Impossible to demand"]
- with open("occupy.txt", "r") as source:
-
- txt = source.readline()
- print(txt)
- new_txt = txt.replace(democracy, democracy_shuffled)
- print(new_txt)
-
-
-
- democracy = "democracy"
- democracy_majuscule = democracy.upper()
- print(democracy_majuscule)
- liste = list( democracy )
- random.shuffle( liste )
- democracy_shuffled = ''.join( liste )
- print(democracy_shuffled)
- sentence = occurences[0]
- print("sentence:", sentence)
- sentence.replace("What are the demands"," what are the demands ")
- print(sentence)
- sentence = occurences[1]
- sentence.replace("there are no demands","therearenodemands")
- print(sentence)
- sentence = occurences[4,5,7]
- chaine = "impossible demands, impossible demand, impossible to demand"
- chaine = chaine [::-1]
- print(chaine)
- sentence = occurences[6]
-
|