I want to use the Python output value as a variable in another list.

Asked 2 years ago, Updated 2 years ago, 79 views

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문

2022-09-22 18:28

1 Answers

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


2022-09-22 18:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.