Avatar ·

replace digit in string

📁 Advanced Python Topics, question

x = ['27342837429']. Replace any digit in the string below 5 with "0", and any digit 5 and above with "1".