0

I want to remove the last ',' from this code how to do it. and it should also print in a single line

 n=int(input())
t=int(input())
m=int(input())
s=n
for i in range(m):
    print(s,end=',')
    s=s+t

output is: 4,6,8,


but i want it to be like: 4,6,8

khelwood
  • 55,782
  • 14
  • 81
  • 108

1 Answers1

1

Maybe you are looking for something like this:

n=int(input())
t=int(input())
m=int(input())
s=n
for i in range(m-1):

    print(s,end=',')
    s=s+t

print(s)