1
  • print(*range(1,n+1),sep='')
  • print(range(1,n+1),sep='')

I am trying to print 123...n sequence as a whole given an interger n,without using any string functions which is a hackerrank question.

https://www.hackerrank.com/challenges/python-print/problem

What is the difference between line 1 and 2?

Please explain in basic terminology as I am new to python.

Fukiyel
  • 1,166
  • 7
  • 19

0 Answers0