(Oct-02-2019, 04:48 PM)jefsummers Wrote: Some language barrier so we are guessing. Do you want: 1. A list of the digits, 1 or 0, from the source string 2. A list of OK or NG depending on whether the source string has 1 or 0 3. Two lists, with the positions of the 1s and 0s. Which, or if you can rephrase the question and do not use the word judge - that is causing confusion
sorry to make you confuse I just want to write the code can let me get ok on 1 or ng on 0
How i can use a simple way to write the code and not use complex way
(Oct-02-2019, 04:48 PM)jefsummers Wrote: Some language barrier so we are guessing. Do you want: 1. A list of the digits, 1 or 0, from the source string 2. A list of OK or NG depending on whether the source string has 1 or 0 3. Two lists, with the positions of the 1s and 0s. Which, or if you can rephrase the question and do not use the word judge - that is causing confusionSorry to make confuse
1.when mystring first position is 1 and I will print 1 or ok else I will print o or ng
2.mystring total have 32 digit I want write a code to make sure single position 1 is reply ok else position 0 is ng
3 base on my string 32 digit I total will get ok 11time cause I have 11 once 1 and 22 ng cause I have 22 once 0
4 i want my out put is get ok*11 ng*22 or 1111111111000000000000000000000