Python入門 「集合型」

共通の友達を探す

my_friends = {'Tom', 'John', 'Kevin'}
his_friends = {'Tom', 'Yamada', 'Arai', 'Okamoto'}
print(my_friends & his_friends)

{'Tom'}

I Wanna Be Your Friend.

Bye🖐

Leave a Reply

Your email address will not be published. Required fields are marked *