Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LIST FORMATTING
#1
I have a list which prints like this:
Hello
My
Name
Is

but I want the first 3 letters of each word, eg.
HellMyNamIs printed like this but it prints like this,
Hell
My
Nam
Is

is there any way to format it for all print on one line and add together like I've done above thank you
Reply
#2
show us your code in python tags.
Note that print function has optional argument end
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
And please don't use all caps. Us old internet fogies see that as shouting.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Currency formatting the third element in a 2D list RedSkeleton007 3 3,182 Mar-09-2018, 12:53 PM
Last Post: j.crater

Forum Jump:

User Panel Messages

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