79588796

Date: 2025-04-23 14:07:56
Score: 2.5
Natty:
Report link

It's normal.
You don't insert a variable but a string.
For insert a variable in a string there are several ways.

My favorite is this :

varToInsert = 131531
String = f"My number is {varToInsert}"

With your code :

def mail(hW):

 mail_body = f"""
 Hey,
 {hW} ## <I want Hello World to be here>
Regards,\nJohn Doe

"""
Reasons:
  • Blacklisted phrase (1): Regards
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Vosco Yagura