Python Forum
simple if elif conditions in Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
simple if elif conditions in Python
#3
university = "name1"

if university in ("name1", "name2", "name3"):
    university_group = "Go8 University"
elif university in ("name4","name5"):
    university_group = "Eligible Go8 University"
else:
    university_group = "Others"
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
simple if elif conditions in Python - by Chandan - Jan-08-2020, 02:00 PM
RE: simple if elif conditions in Python - by DeaD_EyE - Jan-08-2020, 02:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python uppercase conversion conditions Jaypeng 7 3,009 Apr-29-2020, 11:24 AM
Last Post: jefsummers
  python ast if-elif confusion holyghost 3 3,119 Apr-19-2020, 12:36 PM
Last Post: pyzyx3qwerty
  How does while-If-elif-else-If loop conditions check run mrhopeedu 2 1,790 Oct-27-2019, 04:56 AM
Last Post: mrhopeedu
  Python coding mutiple elif's metro17 1 1,785 Aug-02-2019, 10:27 AM
Last Post: metulburr
  Whats the right way to refactor this Big if/elif/elif ? pitosalas 1 2,259 Jul-28-2019, 05:52 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020