Linked Questions

377 votes
22 answers
751k views

I would like to make several statements that give standard output without seeing newlines in between statements. Specifically, suppose I have: for item in range(1,100): print item The result is: ...
Pol's user avatar
  • 25.7k
71 votes
5 answers
126k views

I read that to suppress the newline after a print statement you can put a comma after the text. The example here looks like Python 2. How can it be done in Python 3? For example: for item in [1,2,3,...
Ci3's user avatar
  • 4,872
1 vote
3 answers
24k views

Is it possible to print text on the same line in Python? For instance, instead of having 1 2 3 I would have 1 2 3 Thanks in advance!
Alex Carr's user avatar
3 votes
3 answers
12k views

The aim of the following program is to convert words in 4 characters from "This" to "T***", I have done the hard part getting that list and len working. The problem is the program outputs the answer ...
Kit Yeung's user avatar
  • 135
6 votes
3 answers
8k views

ok, so I am doing this tiny countdown function in vpython, the way I am doing it now is import time print "5" time.sleep(1) print "4" time.sleep(1) print "3" time.sleep(1) print "2" time.sleep(1) ...
user avatar
-5 votes
4 answers
4k views

I have a program that has to only print data onto one line. What can I do to do this. for i in range(10): print(i) Is it possible to print all of this on one line so it prints 0, erases the line,...
PyProg's user avatar
  • 75
-2 votes
1 answer
5k views

i have a list as: one = [(1, 2), (3, 4)] for o in one: print o (1, 2) (3, 4) i need to print (1, 2) and (3, 4) in the same line for o in one: print o (1, 2) (3, 4)
Gianni Spear's user avatar
  • 8,058
1 vote
2 answers
8k views

I'm a little new to Python and I was wondering how you would present more than one output side by side if it was part of different functions. So for a simple example: def function1(): print("This ...
DoeNd's user avatar
  • 13
1 vote
1 answer
896 views

I am trying to use \r to print to the same line in bash (Ubuntu 16.04 terminal) but it doesn't work, as the program still prints frame number in a new line. Here is the code i = 0 while img is not ...
Sapnesh Naik's user avatar
  • 11.7k
1 vote
5 answers
537 views

im triying to print horizontally Text="Si ya conoces Colab, echa un vistazo a este vídeo para obtener información sobre las tablas interactivas" List= [31,43,15,5,26,32,6,1,3,62,62,62,62,62,...
Dami Devil's user avatar
2 votes
4 answers
459 views

I'm new to coding, and I found this exercise problem in a Python practice website. The instructions go like this: "Write a function translate() that will translate a text into "rövarspråket" (Swedish ...
dumpling_san's user avatar
0 votes
2 answers
199 views

For example: list = [1,2,3,4] how would I get this to print something like this: 1 2 3 4
Big boy's user avatar
  • 19
-1 votes
1 answer
471 views

My forest pattern I did print the forest pattern here but i have to print them next to each other instead of printing them in new lines. How can i do that? When i try to add end="" to last ...
Yusuf Ustaoğlu's user avatar
-2 votes
1 answer
285 views

I want to know how to print output in a single line I want to print it like: 1234 instead of 1 2 3 4 Code: # n = (get in from user) i=1 while (i<=n): print (i,) i +=1
Sushmitha Kumaravel's user avatar
0 votes
2 answers
213 views

Not sure if this is asked before but: How do you print "searching for x" where "x" is a random integer? I have my code below: from random import randint numbers = [] random = ...
Melodyyyyy's user avatar

15 30 50 per page
1
2 3 4 5