LogFAQs > #963026054

LurkerFAQs, Active DB, DB1, DB2, DB3, DB4, DB5, DB6, DB7, DB8, DB9, Database 10 ( 02.17.2022-12-01-2022 ), DB11, DB12, Clear
Topic List
Page List: 1
TopicITT: I document my Python coding journey
Blue_Thunder
02/27/22 6:05:46 PM
#12:


SamusGlory posted...

people = ['Brian', 'James', 'Nikki', 'Christine']
for person in people:
if person == 'Jessie':
print(f"{person} is my girlfriend.")
else:
print(f"{person} is my friend.")

The output for this is:
Brian is my friend.
James is my friend.
Jessie is my girlfriend.
Christine is my friend.

Please excuse my nitpicking but there's no 'Jessie' in the list :p

Anyways, wishing you the best!

---
Jenshin Team: https://i.imgur.com/bI5jkfL.png Smash Team: https://i.imgur.com/cwl2RwJ.png
... Copied to Clipboard!
Topic List
Page List: 1