n=int(input("Enter any number"))
      s=str(n)
      l=[]
      for i in s:
          if(i=='0'):
              l.append('1')
          else:
              l.append(i)
      ns=""
      for i in l:
          ns+=i
      print(int(ns))
      

      Python language logoReplace all 0’s with 1 in a given integer

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.