Ad

You can print in next line with \n new line character. It is your choise to keep whatever you want.Good luck

Code
Diff
  • #print("hello")
    #print(2+5)
    
    print("hello\n", 2+5)
    • print("hello")
    • print(2+5)
    • #print("hello")
    • #print(2+5)
    • print("hello\n", 2+5)

It takes 2 times less than the original code. It your choice to keep whichever code you want. Good luck

Code
Diff
  • def sumi(arr): # parity: sum([]) == 0
        #try: return arr.pop(0) + sumi(arr)
        #except: return 0
        sum=0
        for i in range(len(arr)):
            sum+=arr[i]
            i+=1
        return sum
    • def sumi(arr): # parity: sum([]) == 0
    • try: return arr.pop(0) + sumi(arr)
    • except: return 0
    • #try: return arr.pop(0) + sumi(arr)
    • #except: return 0
    • sum=0
    • for i in range(len(arr)):
    • sum+=arr[i]
    • i+=1
    • return sum