if else statement on one line in Python

import pandas as pd
df = pd.DataFrame({"Hi":['Namaste',"Hello",'Marhaba','','Namaskar','Nǐ hǎo','Hoi','','Bonjour',]})
df

Out:

 Hi
0Namaste
1Hello
2Marhaba
3 
4Namaskar
5Nǐ hǎo
6Hoi
7 
8Bonjour
[0 if x =="" else 1 for x in df['Hi']]

Out:

[1, 1, 1, 0, 1, 1, 1, 0, 1]