defmain():n=int(input("Input any number : "))print_diamond(n)defprint_diamond(n):s=str(int('1'*n)**2)f='%'+str(n-1)+'s'foriinmap(int,s):printf%s[:i-1]+s[-i:]if__name__=="__main__":main()
I'm a JS Subject Matter Expert (SME) that has spent the past few years spearheading curricula and teaching initiatives at colleges and bootcamps, in person and virtually.
Nice to having you on this post 👋🙂
And nice to have you join our community and partcipatd! 🤓