Home > other >  The following line of code written seems to be very advanced, I didn't understand, the beginner
The following line of code written seems to be very advanced, I didn't understand, the beginner

Time:09-16

The following line of code written seems to be very advanced, I didn't understand, the beginners who to explain what is rewritten into a normal form?
PersonList={} if get_data ()==None else get_data ()

CodePudding user response:

Equal to, the following code is a conditional assignment statements,
 if get_data ()==None: 
PersonList={}
The else:
PersonList=get_data ()
  • Related