Quick actions

cmd+k|ctrl+k

Navigation

Languages

Pure Functions

Snippet info

Language

Python

Visibility

public

Author

ankushsahu203

Created

2026-07-24T04:24:07.440666Z

Updated

2026-07-24T04:24:07.440666Z

def  multiply_by2(li):
    
    new_list=[]
    for item in li:
        new_list.append(item*2)
    return new_list
        
print(multiply_by2([1,2,3]))


#It doesnot effect in real world .
#But if we create new_list out side the fun so it give same output but it effect outside and we can't change inside the function  .
#it also give effect the real world or on screen when we can write inside the function
        
INFO