I've been trying to use the sep=''
to separate the numbers in between each other but they never separate unless I use end=""
.
However, when I switch sep=''
with end=""
it works properly.
So, what am I doing wrong?
Also, how do I separate the numbers in between with a "+"
symbol without having it appear at the end?
Thanks!
#Counter
numcounter=0
#Get starting integer from user
s_num=int(input("Please enter a valid starting integer number: "))
#Get ending integer from user
e_num=int(input("Please enter a valid ending integer number: "))
#For loop
for numbers in range (s_num,e_num+1):
numcounter+=numbers
print(numbers, sep='')
This was the output:
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
Please enter a valid starting integer number: 1
Please enter a valid ending integer number: 5
1
2
3
4
5