Python函数里的爱情故事

  • A+
所属分类:python基础入门

Python函数里的爱情故事

全文约 3200 字,读完可能需要 4 分钟。

一直被拒型

  1. def my_love_story:

  2. for girl in every_girl_I_liked:

  3. response = declare_love(girl)

  4. if response != "NO":

  5. raise RunTimeError("There must be something wrong with the girl.")

孤单型

  1. def my_love_story:

  2. return None

自己动手型

  1. def my_girl_friend:

  2. return "Right Hand"

或者

  1. import random

  2. def my_girl_friend:

  3. my_girl_friends = ["Left Hand", "Right Hand"]

  4. return random.choice(my_girl_friends)

风流型

  1. def my_love_story:

  2. for girl in every_girl_I_have_met:

  3. sleep_with(girl)

一见钟情型

  1. def my_love_story:

  2. assert love_at_first_sight(my_girl_friend) is True

钟爱一生型

  1. def my_love_story:

  2. girl = met_a_girl

  3. girl_friend = dated_her(girl)

  4. wife = got_married(girl_friend)

  5. mother = had_a_child(wife)

  6. assert girl is girl_friend is wife is mother

寻找真爱型

  1. def my_love_story:

  2. girl = find_someone

  3. while not is_the_one(girl):

  4. girl = find_someone

  5. live_happily_ever_after

韩剧型

  1. def my_love_story:

  2. assert me.is_wealthy

  3. assert me.is_handsome

  4. assert me.is_tall

  5. girl = someone_I_met_at_a_random_party

  6. me.hate(girl)

  7. me.fell_in_love_with(girl)

  8. girl.ex_boy_friend is jerk

  9. me.fight(girl.ex_boy_friend)

  10. me.date(girl)

  11. me.mother.hate(girl)

  12. me.mother.find_me_another_girl

  13. me.break_up_with_my_family

  14. girl.got_cancer

  15. me.is_devastated

  16. me.mother.give_money_to(me)

  17. me.mother.accept(girl)

  18. girl.is_cured

  19. me.kiss(girl)

  20. the_end

相亲型

  1. def my_love_story:

  2. available_girls = filter(who_does_not_mind_my_poverty, girls_my_mother_set_me_up)

  3. marry(biggest_boobs(available_girls))

现实型

  1. def my_love_story:

  2. girl = met_a_girl

  3. girl_friend = fell_crazy_in_love(girl)

  4. with before_getting_married(girl_friend):

  5. if not all([me.have_a_house, me.have_a_car, me.have_a_lot_of_money]):

  6. girl_friend.break_up_with(me)

我爱的人和爱我的人型

  1. def my_love_story:

  2. for girl in every_girl_that_loved_me:

  3. me.reject(girl)

  4. for girl in every_girl_that_I_loved:

  5. girl.reject(me)

暗恋型

  1. def my_love_story:

  2. places_I_have_been = [classrooms, companies, supermarkets, restaurants, trains, hotels_I_stayed]

  3. for girl in the_most_beautiful_girl:

  4. me.fell_in_love_with(girl)

  5. girl.never_notice(me)

If u rd al abv, and udrstnd tm, chncs r u dnt hv a grl frnd.

题图:pexels,CC0 授权。

点击阅读原文,查看更多 Python 教程和资源。

weinxin
我的微信公众号
爱真理,得永生!          爱在灵灵久博客,网罗天下,福利大家!

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: