0

+1 9956755308

how to change this mobile number to persian or arabic numbers with unicode

1 Answers1

4

You can do it with translating:

arabic = '۰١٢٣٤٥٦٧٨٩'
english = '0123456789'

translation_table = str.maketrans(english, arabic)

translated_num = "+1 9956755308".translate(translation_table)
Amin
  • 2,605
  • 2
  • 7
  • 15