*args and **kwargs in Python || Python tutorial for absolute beginners in Hindi || #26

preview_player
Показать описание


Exam Aasaan Hai!!!
Рекомендации по теме
Комментарии
Автор

Sir plz explain ....here you have already taken value and key
if we want key and value fro the user on that time what we should ???

akankshagupta
Автор

Thank you so much...bhot hi simple explanation thi aapki

Main aoch hi rhaa tha ke agr direct list aur dictionary se kr skta tu phir *args **kwargs ka Kai faida


Thnx to you ....Now I know

theanonymous
Автор

after keyword def and fuction name, any value inside the parenthesis are parameters and not arguments,

gregorymarshall
Автор

Last Walt jo str value li hai bt output comes same so

reenaanand
Автор

Why i ma not getting expected result through this code

def net_amount (tax, discount, *args):
for amt in args:
net = (amt + (amt * tax / 100) - (amt * discount /100))
print('The net value of bill ', amt, 'is ', net)

bill = [1000, 2000, 3000, 4000, 5000]
tax = float (input ('please enter tax percentage:'))
discount = float (input ('please enter disc percentage:'))

net_amount(*bill)

pankajv
join shbcf.ru