(Oct-02-2019, 06:02 AM)buran Wrote: I don't know about other members, but for me it's not clear what you try to do. Also, what strTargetData
is? What does "judge my code/string" means?
strTargetData is i write wrong info actaully i want to write mystring not strTargetData Good Day,
the question I would like to ask is I can judge in (mystring = "1111111111100000000000") every single position. and want use 1 to judge.
for example
myjudge = "1"
mystring = "1111111111100000000000"
mystring[1] #this is the code i judge my string position 1
if mystring == "myjudge":
print mystring = 1
else:
print mystring = 0
my output will get 1 if the judgment is correct else will judge 0
actually I want to write the code on the simple way but I am no ideal how can I write my code on complex way I total write 32 times to judge (mystring=1111111111100000000000) result
my output result is
1111111111100000000000
mystring[1] #this is the code i judge my string position 1
if mystring == "myjudge":
print mystring = 1
else:
print mystring = 0
I TOTAL WRITE THIS CODE 32 TIME
now I am thinking how I can use for loop to write the code or another simple way to write the code