following example demonstrates variable-length argumentdef fun(name*friendslist)print("friends of",name,"are"for in friendslistprint(xend 'fun("shaa""ayaan""avi","velan"output of the above example is as followsfriends of shaa areayaan avi velan scope of variables variables in program has two thingsscopeparts of the program in which it is accessible lifetimehow long variable stays in the memory based on scope of variablethere are two types of variables global variables local variables following are the differences between global variable and local variableglobal variable local variable variable which is defined in the main body of the program file variable which is defined inside function accessible throughout the program file accessible from the point it is defined to the end of the block it is defined in accessible to all functions in the program they are not related in any way to other variables outside the function following example demonstrates local and global variablesx def fun() print("local =",xfun(print("global =",xbv prasanthi dept of cse page