Python Forum
I there a more efficient way of printing ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I there a more efficient way of printing ?
#5
(Nov-30-2020, 08:34 PM)Capitaine_Flam Wrote: Do you know another method that will work on micropython?
Try with .foramt() method,it should works as it was new in Python 2.6.
x = 5
y = 50
z = 999

print('({}, {}, {})'.format(x, y, z))
# Or
print('{}'.format((x, y, z)))
Output:
(5, 50, 999) (5, 50, 999)
Reply


Messages In This Thread
RE: I there a more efficient way of printing ? - by snippsat - Nov-30-2020, 08:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  A more efficient code titanif 2 573 Oct-17-2023, 02:07 PM
Last Post: deanhystad
  Making a function more efficient CatorCanulis 9 2,074 Oct-06-2022, 07:47 AM
Last Post: DPaul
  Simple problem. looking for an efficient way silverchicken24 3 2,442 Oct-14-2019, 07:13 PM
Last Post: Larz60+
  Is there a more efficient way to code this project? gkiranseo 1 2,759 Sep-25-2018, 09:51 AM
Last Post: Larz60+
  Need help making code more efficient dhbergen 5 4,019 Apr-17-2018, 01:00 AM
Last Post: dhbergen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020