how to print dot in python without newline

how to print dot in python without newline

Hi,

I a debugging python program and I am using following code to print dots:

print("................")

I want to print pre-defined number of dots for testing purpose.

For example in some loop I want to print 10 dots and in other places i want to print 20 dots without new line.

Is there any easy solution?

how to print dot in python without newline?

Can I use variable to decide no of times dot to be printed?

I am searching for easy solution.

Thanks

View Answers

February 15, 2019 at 9:08 PM

HI,

You can use following code:

print("."*10);

This code will print 10 dots without new line.

Here is output of the program.

>>> print("."*10);
..........

You can also define a variable to print the no of times and then use it with the print command as shown below:

no_of_times = 20;
print ("." * no_of_times);

Here is output:

>>> no_of_times = 20;
>>> print ("." * no_of_times);
....................
>>>

This way you can print dots pre-defined no of times.

Thanks









Related Tutorials/Questions & Answers:
how to print dot in python without newline
how to print dot in python without newline  Hi, I a debugging... to print 20 dots without new line. Is there any easy solution? how to print dot in python without newline? Can I use variable to decide no of times dot
how to print dot in python without newline
? how to print dot in python without newline?ADS_TO_REPLACE_2 Can I use variable...how to print dot in python without newline  Hi, I a debugging python program and I am using following code to print dots: print
Advertisements
print without newline in python
print without newline in python  Hi, I have a Python program... ") print("Python") But the output is coming in new lines. I want to know how to print without newline in python? Thanks   Hi,ADS_TO_REPLACE_2
print without newline in python
print without newline in python  Hi, I have a Python program... the print it in one line. My example: print("I ") print("Love ") print("Python") But the output is coming in new lines. I want to know how to print without
print the newline
print the newline  Why doesn?t the following code print the newline properly? <?php $str = ?Hello, there.\nHow are you?\nThanks for visiting.?; print $str; ?>   Hi friends, Inside the single quotes \n (newline
How to print a webpage without url and date in jsp ?
How to print a webpage without url and date in jsp ?  How to print a webpage without url and date in jsp
python replace newline with space
python replace newline with space  Hi, I want to replace newline character \n With space in python. How to replace newline with space in python? Thanks   Hi, Its easy in python. You can use the replace method
python replace newline with space
python replace newline with space  Hi, I want to replace newline character \n With space in python. How to replace newline with space in python? Thanks   Hi, Its easy in python. You can use the replace method
How to print like printf in python
How to print like printf in python  Hi, I am from C background and there used to be printf function. Jow to print like printf in python? The printf function is C/C++ is very useful. So, looking for some line printf in Python
print reverse string without api
print reverse string without api  accept a string and print reverse without using api
ModuleNotFoundError: No module named 'python-graph-dot'
named 'python-graph-dot' How to remove the ModuleNotFoundError: No module named 'python-graph-dot' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'python-graph-dot'  Hi, My
ModuleNotFoundError: No module named 'python-graph-dot'
named 'python-graph-dot' How to remove the ModuleNotFoundError: No module named 'python-graph-dot' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'python-graph-dot'  Hi, My
how to print float with 2 decimals python
how to print float with 2 decimals python  Hi, I am new to Python programming and trying to print float value on console. I want to print this value with 2 decimals places. How to print float with 2 decimals python?ADS
how can i remove newline characters and tabs
how can i remove newline characters and tabs   how can i remove newline characters and tabs ? but i wont to using GUI .please help
how to move pointer in Textfield to newline
how to move pointer in Textfield to newline  consider my case and provide me solutions: import java.awt.; import java.awt.event.; class Table1 extends Frame implements ActionListener{ TextField tf1,tf2,tf3
pretty-print json in python
it in our Python program. Now the returned the JSON is not formatted so my requirement is to format it and use it. How we can easily format a JSON in Python...pretty-print json in python  Hi, JSON is very easy way of saving
ModuleNotFoundError: No module named 'print-python'
'print-python' How to remove the ModuleNotFoundError: No module named 'print-python' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'print-python'  Hi, My Python
python print on same line in loop
this and print in the same line. Let's know how to make function in Python to print data...python print on same line in loop  Hi, I have a unique requirement in Python where I have to print data in the same line. When I am using
python print dots with printf style
python print dots with printf style  Hi, There is printf function in c and c++. How to use same system function python? I want program in python thats print dots with printf style. ThanksADS_TO_REPLACE_1
how to print the server time
how to print the server time  i want to print database time in clintside and update time in every secound without creating connection to database for each time. how can i do
ModuleNotFoundError: No module named 'flake8-class-newline'
: No module named 'flake8-class-newline' How to remove the ModuleNotFoundError... flake8-class-newline python with following command: pip install flake8-class-newline After the installation of flake8-class-newline python library
print selected checkbox names in array without form tag
print selected checkbox names in array without form tag  Hi everyone ... I have problem in my program. I have hashmap i.e. collection , my... seleced checked checkbox names, when i click on button but without using FORM tag
ModuleNotFoundError: No module named 'python-print-lh'
named 'python-print-lh' How to remove the ModuleNotFoundError: No module named 'python-print-lh' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'python-print-lh'  Hi, My
ModuleNotFoundError: No module named 'Python-Print-SDK'
named 'Python-Print-SDK' How to remove the ModuleNotFoundError: No module named 'Python-Print-SDK' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'Python-Print-SDK'  Hi, My
ModuleNotFoundError: No module named 'python-slack-print'
named 'python-slack-print' How to remove the ModuleNotFoundError: No module named 'python-slack-print' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'python-slack-print'  Hi, My
how to print - Java Beginners
how to print  how to print something on console without using System.out.print() method ?  Hi Friend, You can use PrintWriter to write anything on the console. import java.io.*; public class Print{ public static
ModuleNotFoundError: No module named 'dot'
ModuleNotFoundError: No module named 'dot'  Hi, My Python program...' How to remove the ModuleNotFoundError: No module named 'dot' error... library. You can install dot python with following command: pip install
Java write newline
Java write newline       Following example demonstrates,  how to get newline feature... of abstract writer class. ADS_TO_REPLACE_1 In the example newLine feature
how to print the server time
how to print the server time  how to print the server time in jsp and update time in fix interval
How to print this Format exactly?
How to print this Format exactly?   * * * & reverse
How to print this in java?
How to print pattern in Java?  How to print a particular pattern in Java...;  How to print this in java
how to print String as pattern ?
how to print String as pattern ?  i have a one String name ="rajesh" i want to print pattern like r * ra ** raj raje rajes rajesh please help me
dot net
dot net  how to open a new window having detailed contents by clicking a marquee text in a page(like news details opening on clicking flash news title) in dot net 2003
Can I learn machine learning without python?
Can I learn machine learning without python?  Hi, I am beginner... to learn: Can I learn machine learning without python? Try to provide me good... learning without python?". Also tell me which is the good training courses
How to pretty print a JSON file in Python?
How to pretty print a JSON file in Python? In this tutorial I will teach you to read the JSON file in Python and then pretty print the content... in Python, format the JSON and print the formatted content. The formatted content can
How to print UIButton id
How to print UIButton id  How to get the id of the button in the IOS application? Thanks   Hi, You can use the following code: - (IBAction)btnClicked:(id)sender { UIButton *button = (UIButton *)sender; int
ModuleNotFoundError: No module named 'sceptre-dot'
ModuleNotFoundError: No module named 'sceptre-dot'  Hi, My Python... 'sceptre-dot' How to remove the ModuleNotFoundError: No module named 'sceptre-dot' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'sparse_dot'
ModuleNotFoundError: No module named 'sparse_dot'  Hi, My Python... 'sparse_dot' How to remove the ModuleNotFoundError: No module named 'sparse_dot' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'apyref-dot'
ModuleNotFoundError: No module named 'apyref-dot'  Hi, My Python... 'apyref-dot' How to remove the ModuleNotFoundError: No module named 'apyref-dot' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'dot-cli'
ModuleNotFoundError: No module named 'dot-cli'  Hi, My Python...-cli' How to remove the ModuleNotFoundError: No module named 'dot-cli... to install padas library. You can install dot-cli python with following command
ModuleNotFoundError: No module named 'dot-dict'
ModuleNotFoundError: No module named 'dot-dict'  Hi, My Python...-dict' How to remove the ModuleNotFoundError: No module named 'dot-dict... to install padas library. You can install dot-dict python with following
ModuleNotFoundError: No module named 'dot-kernel'
ModuleNotFoundError: No module named 'dot-kernel'  Hi, My Python... 'dot-kernel' How to remove the ModuleNotFoundError: No module named 'dot... have to install padas library. You can install dot-kernel python
ModuleNotFoundError: No module named 'dot_snek'
ModuleNotFoundError: No module named 'dot_snek'  Hi, My Python..._snek' How to remove the ModuleNotFoundError: No module named 'dot_snek... to install padas library. You can install dot_snek python with following
ModuleNotFoundError: No module named 'dot-to-osscript'
named 'dot-to-osscript' How to remove the ModuleNotFoundError: No module named 'dot-to-osscript' error? Thanks   Hi, In your python... python with following command: pip install dot-to-osscript After
ModuleNotFoundError: No module named 'magic-dot'
ModuleNotFoundError: No module named 'magic-dot'  Hi, My Python... 'magic-dot' How to remove the ModuleNotFoundError: No module named 'magic-dot' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'masonite-dot'
ModuleNotFoundError: No module named 'masonite-dot'  Hi, My Python... 'masonite-dot' How to remove the ModuleNotFoundError: No module named 'masonite-dot' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'collective-dot'
named 'collective-dot' How to remove the ModuleNotFoundError: No module named 'collective-dot' error? Thanks   Hi, In your python... python with following command: pip install collective-dot After
ModuleNotFoundError: No module named 'dot_access'
ModuleNotFoundError: No module named 'dot_access'  Hi, My Python... 'dot_access' How to remove the ModuleNotFoundError: No module named 'dot... have to install padas library. You can install dot_access python
ModuleNotFoundError: No module named 'dot-configs'
ModuleNotFoundError: No module named 'dot-configs'  Hi, My Python... 'dot-configs' How to remove the ModuleNotFoundError: No module named 'dot-configs' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'dot-prop'
ModuleNotFoundError: No module named 'dot-prop'  Hi, My Python...-prop' How to remove the ModuleNotFoundError: No module named 'dot-prop... to install padas library. You can install dot-prop python with following

Ads