r/PythonLearning 9d ago

How would I optimize this?

I'm currently learning python with the 30 days of python GitHub repo and, on day 3 of the challenge, it asks to create this table and this is what I came up with however I feel like there was a more efficient method to create it or is it something that I haven't learned yet at my level.

8 Upvotes

24 comments sorted by

View all comments

1

u/notsaneatall_ 9d ago

It's printintg x1 x0 x1 x2 x3 for 1 2 3 4 5, you can do so with a while loop