ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Python | Function handling mutable and immutable

CBSE

grade12

XII

Computer Science

python

mutable

immutable

Автор: Florence Sharmila

Загружено: 2020-03-23

Просмотров: 45

Описание: How does the function handles when passed mutable and immutable datatypes as the parameters:

Case1:
def china(a):
print("Inside China\n")
print("Values recieved in side china",a)
a=a+2
print("values after change inside china()",a)
main
num= 3
print("Calling china(), passing", num)
china(num)
print("Back from china(), num value in global scope

Case2:
def china(ChinaList):
print("Inside China\n")
print("Values recieved in side china",ChinaList)
ChinaList.append(2)
ChinaList.extend([5,1])
ChinaList.remove(5)
print("values after change inside china()",ChinaList)
main
IndiaList=[1]
print("Before Calling china(), passing", IndiaList)
china(IndiaList)
print("Back from china(), num value in global scope ", IndiaList)

Case3:
def china(ChinaList):
print("Inside China\n")
print("Values recieved in side china",ChinaList)
ChinaList.append(2)
ChinaList.extend([5,1])
ChinaList.remove(5)
print("values after change inside china()",ChinaList)
main
IndiaList=[1]
print("Before Calling china(), passing", IndiaList)
china(IndiaList)
print("Back from china(), num value in global scope ", IndiaList)

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Python | Function handling mutable and immutable

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]