I am noob in python, and I am making simple script to translate single variable into str of integers.
Here's my code for reference.
COURTNAME="A"
if str(COURTNAME)=="A":
COURTNO=="000201"
elif str(COURTNAME)=="B":
COURTNO=="000214"
elif str(COURTNAME)=="F":
COURTNO=="000600"
elif str(COURTNAME)=="G":
COURTNO=="000270"
elif str(COURTNAME)=="H":
COURTNO=="000300"
elif str(COURTNAME)=="I":
COURTNO=="000400"
elif str(COURTNAME)=="J":
COURTNO=="000411"
elif str(COURTNAME)=="K":
COURTNO=="000420"
elif str(COURTNAME)=="L":
COURTNO=="000500"
elif str(COURTNAME)=="M":
COURTNO=="000520"
elif str(COURTNAME)=="N":
COURTNO=="000530"
else:
COURTNO==COURTNAME
print(COURTNO)
This did not yield "000201."
What should I do to get 000201?
Any change or improvement I can make is always welcome.
Aucun commentaire:
Enregistrer un commentaire