+ 9

Generating using numbers, text, and periods and commas. I cannot find an example and definitions aren't making complete sense.

using Python 2.7.13, how do I generate. C>C1 and C>C2... as you see. the C stays the same and so does > . where the numbers are how do I get it to generate to the range of 350. c>c350. is this more complex=> abcd(xyz1,24)>abcd(xyz2,24)... I would like for it to generate to 350 as well. abcd(xyz1,24)>abcd(xyz350,24) thanks for any direction or code examples. have a great weekend!

6th Oct 2017, 8:41 PM
Joshua Smith
Joshua Smith - avatar
2 odpowiedzi
+ 7
I presume you are mostly looking for help with putting the string parts together. If you use str() to turn the loop counter into a string, you can put the unchanging strings with the loop variable. for i in range(3): print("C>C"+str(i+1)) https://code.sololearn.com/c9wb3QAOOa8L/?ref=app
6th Feb 2018, 10:55 AM
SQrL
SQrL - avatar
7th Mar 2018, 10:15 AM
SQrL
SQrL - avatar