Generated poem: Difference between revisions
(Created page with "==Basic== ===My own=== <source lang=python> import random from random import choice subject = ("I", "The ball", "You") cha = ("uncertainity", "unconsciousness", "unclarity",...") |
(→My own) |
||
(One intermediate revision by the same user not shown) | |||
Line 19: | Line 19: | ||
print() | print() | ||
</source> | </source> | ||
<b> -> Outcome </b> | |||
<pre> | <pre> |
Latest revision as of 14:36, 22 October 2020
Basic
My own
import random
from random import choice
subject = ("I", "The ball", "You")
cha = ("uncertainity", "unconsciousness", "unclarity", "unreality", "incuriousity")
for x in range (10) :
a = choice(subject)
c1 = choice(cha)
c2 = list(cha) # to remove an element in tuple, must change to list (list = ["",""], tuple = ("","")
c2.remove(c1) # c2 is a list except the result of c1
c2 = choice(c2)
print(f"{a} as a part in the container,")
print(f"always deal with {c1} and {c2}.")
print()
-> Outcome
The ball as a part in the container, always deal with unconsciousness and unclarity. You as a part in the container, always deal with incuriousity and unclarity. I as a part in the container, always deal with uncertainity and unconsciousness. You as a part in the container, always deal with uncertainity and unconsciousness. You as a part in the container, always deal with unclarity and unreality. You as a part in the container, always deal with unreality and unconsciousness. I as a part in the container, always deal with unclarity and unconsciousness. I as a part in the container, always deal with uncertainity and incuriousity. I as a part in the container, always deal with unclarity and uncertainity. I as a part in the container, always deal with unconsciousness and unreality.