#๐ print a variable at a certain point of the loop
12 messages ยท Page 1 of 1 (latest)
@tranquil nexus
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
!e ```py
for i in range(9999):
if i % 365 == 0:
print(i)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 0
002 | 365
003 | 730
004 | 1095
005 | 1460
006 | 1825
007 | 2190
008 | 2555
009 | 2920
010 | 3285
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/3VOR7YKX6IP3Z2J7Y7PWCEKT2I
Hi, you can use the if conditional. for i in range(9999): if i == 365: print(i).
why wont it work here
because it breaks
ohhhh yeaa i see it now thx
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.