If I write my code like this,
friends = ["Kafi", "Saif", "Shaheer", "Azmain", "Labid", "Faiz", "Azmain"]
lucky_numbers = [114, 151, 172, 7, 1, 63, 14, 543]
friends.extend(lucky_numbers)
print(friends)
then my code runs perfectly. But if I use the extend function inside the print function like this,
friends = ["Kafi", "Saif", "Shaheer", "Azmain", "Labid", "Faiz", "Azmain"]
lucky_numbers = [114, 151, 172, 7, 1, 63, 14, 543]
print(friends.extend(lucky_numbers))
then I get "None" as an output. Why can't I use the extend function inside the print function?