Skip to content

Commit fb9e588

Browse files
committed
Added excercise_12.py to Python-Basic-to-Advance repo
1 parent bc0abb9 commit fb9e588

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

excercise_12.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import random
2+
names=input("enter everybody's name separated by comma:")
3+
names_list=names.split(',')
4+
names_list = [name.strip() for name in names_list]
5+
6+
print(names_list)
7+
will_pay_bill=random.choice(names_list)
8+
print(f"{will_pay_bill} will pay the bill.")

0 commit comments

Comments
 (0)