0
I want to display only the day of the week? someone help me, it doesn't show nothing
week=['monday','tuesday','wednesday','thursday','friday','saturday','sunday'] for n in week: if n== 'saturday' or 'sunday': continue print(n)
5 odpowiedzi
+ 2
hm...
if n=='saturday' or n=='sunday':
print(n)
is that what do you mean?
+ 1
Sousou 's answer will work. Another way it could be done (which would make it shorter to write if there are more options) would be:
if n in ('saturday','sunday'):
continue
print(n)
edited: apologies for confusion.
0
Thanks for the answers :) , but I want to display just the days week [Monday, Tuesday, Wednesday, Thursday, and Friday] but not the weekend. I've put "continue" to pass the Saturday and Sunday.
0
Sorry, I had misread Sousou's answer. Here's what you needed:
https://code.sololearn.com/cq2VFZPX3OPI/?ref=app
0
Greeeat! Thank you so much :)