lundi 29 mars 2021

How to save an empty variable in the condition so that it does not omit a line in the statement but continues next?

How can I achieve that if the condition stores an 'empty' variable else continues in code? So as not to miss a line

The code goes through the cycle and gradually prints according to the condition

if frst==1:
    variable=''
else:
 variable= #code something

my output

-7 2 0
-8 3 0 

10 11 -12 13 0

line spacing is my variable

required output

-7 2 0
-8 3 0 
10 11 -12 13 0

I need it to be stored in the variable so as not to leave a space. Is there a way to solve this?

Aucun commentaire:

Enregistrer un commentaire