I made a code that increases the date by a month using the if and when statements. And if you use a print between the codes, you can do whatever you want 201607 201608 201609 201610 201611 201612 The dates come out like this. But I want to apply these dates as variables using the for statement in other sentences, but that doesn't work. There are only two gender cases in other sentences, so sex changes when you use the for statement in the sentence you want with sex_list = ["F", "M"]. But I don't know what to do with the date. For example, aaaa201607bbbbbF, aaaa201607bbbbM, aaa201608bbbbf, aaaa201608bbbbbf, and so on. How do I put the result value of the date iteration created above into a variable in another sentence?
python if문
Please append the dates you made (201607 201608 201609 201610 201611 201612) one by one on an empty list and make the sentence you want with that list
© 2024 OneMinuteCode. All rights reserved.