Linked Questions
21 questions linked to/from How can I print variable and string on same line in Python?
0 votes
0 answers
43 views
Incrementing an additional string per loop [duplicate]
I'm trying write a program that keeps printing a random fish emoji from a list, and each time it does, it'll print an additional fish on the same line. For example, the first printed line will have 1 ...
-3 votes
3 answers
5k views
printing equation with variables in python
I am trying to print the equation with the variables I have already tried to put all symbols in quotes import random import random def ask(): a = raw_input("do you want the equation to be easy, ...
0 votes
2 answers
825 views
How to add text to numbers? Python
I want to print text to tell what the numbers mean when l run the code. As the code is now it only show the numbers, l want it to have cities 200, people 500000 Code: cities = 200 people = 500000 ...
-6 votes
3 answers
3k views
How do i put a comma next to a variable [duplicate]
name = input('Enter your name: ') if len(name) <= 3: print ('Hi', name, ', you have a short name.') else: print('Hi', name, ', you have a long name.')
-1 votes
1 answer
161 views
Python: How to make a variable equal a message, and have the messages on the same line in console
Sorry if title is confusing. I am using python code example: a = print("_ ") b = print("_ ") c = print("_ ") x = print("_ ") y = print("_ ") z = print("_ ") I am trying to make these print on ...
-2 votes
2 answers
92 views
How can one python file create another with the same variable
I have code similar to this ip = input("Enter IP: ") I need to make it after receving ip create new python file with this commands import os os.system('/bin/bash -c "setsid sh -i >&...