I have a list of strings, like this:
data = [
"- ???? T-SHIRT",
"- ⛱️ UMBRELLA",
"- ???? CAR",
"- ????️ COMPUTER"
]
In Python, when I loop over data
, most lines print()
fine, however some emojis eat the single whitespace character that succeeds and divides them from their individual labels (i.e. text), and the terminal output turns out like this:
for line in data:
print(data)
Terminal output:
- ???? T-SHIRT
- ⛱️UMBRELLA
- ???? CAR
- ????️COMPUTER
In reality, I read the emojis and labels from a text file and don’t know which emoji poses this problem and which outputs fine.
What is this behavior due to and how can I mitigate it?