list共49篇
Python List Tutorial-拾光赋

Python List Tutorial

Python List Tutorial,#Problem 1: Print the following Output from the 2 given lists. #10 5 10 7 #20 5 20 10 20 30 #30 5 30 10 l1 = [10,20,30] l2 = [5,10,30] for value in l1: for ele...
kity的头像-拾光赋kity1个月前
0378
Day-26 List Comprehension-拾光赋

Day-26 List Comprehension

Day-26 List Comprehension,List Comprehension: It's a syntactically elegant method to create or manipulate lists in a single line of code. Write a program to print the fruits contai...
kity的头像-拾光赋kity3个月前
0385
Day-25 List functions, Tasks-拾光赋

Day-25 List functions, Tasks

Day-25 List functions, Tasks,split(): The split() method divides a string into a list of substrings based on a separator. join(): The join() method concatenates the elements of an ...
kity的头像-拾光赋kity3个月前
04111
Day 24 - List Functions-拾光赋

Day 24 – List Functions

Day 24 - List Functions,extend() vs append() vs insert(): extend()-Adds all elements from an iterable (e.g., list, tuple) to the end of the list. append()-Adds a single element to ...
kity的头像-拾光赋kity3个月前
0565
Day 23 - List and List functions-拾光赋

Day 23 – List and List functions

Day 23 - List and List functions,List: List is represented by List is a collection of heterogeneous data(Different datatype). List is index_based List is mutable(changeable) Exampl...
kity的头像-拾光赋kity3个月前
03212
Weekend Tasks - List-拾光赋

Weekend Tasks – List

Weekend Tasks - List,Task:1 s = 'a4k3b2' 1) Write a program to get the output 'abbbbklllbcc' s = 'a4k3b2' output = '' i = 0 while i < len(s): first = s[i] second =s[i + 1] if se...
kity的头像-拾光赋kity3个月前
0389
Python Day-26 List comprehension-Exercises-拾光赋

Python Day-26 List comprehension-Exercises

Python Day-26 List comprehension-Exercises, List Comprehension List comprehension offers a shorter syntax when you want to create a new list based on the values of an existing list...
kity的头像-拾光赋kity3个月前
03613
Python Day-25 List functions, Tasks-拾光赋

Python Day-25 List functions, Tasks

Python Day-25 List functions, Tasks,split(): It converts string into list and seperated by commas. join(): It converts list into string. Example: 1. Reverse the given input-->th...
kity的头像-拾光赋kity3个月前
0347
Python Day-24 List Functions-拾光赋

Python Day-24 List Functions

Python Day-24 List Functions,extend() vs append() vs insert()-->Interview question insert()-Adds an element at the specified position append()-Adds single element at the end of ...
kity的头像-拾光赋kity3个月前
0306
Python Day-23 Lists and list functions,Task-拾光赋

Python Day-23 Lists and list functions,Task

Python Day-23 Lists and list functions,Task,List: [ ] --> Symbol -->Collection of Data -->Collection of Heterogeneous Data(different data types) -->List is Index Based ...
kity的头像-拾光赋kity3个月前
05214
The Ultimate Guide to Lists in Java: Everything You Need to Know-拾光赋

The Ultimate Guide to Lists in Java: Everything You Need to Know

The Ultimate Guide to Lists in Java: Everything You Need to Know, DSA (12 Part Series) 1 Mastering Constraints and Problem-Solving Strategies in DSA 2 How to Start DSA (Data Struct...
kity的头像-拾光赋kity4个月前
0286
Find the Duplicate Elements in an Array/List-拾光赋

Find the Duplicate Elements in an Array/List

Find the Duplicate Elements in an Array/List,Given an array of integers, find all the elements that are duplicated. Example: Input: [1, 2, 3, 4, 3, 2, 5] Output: [2, 3] Hint: You c...
kity的头像-拾光赋kity5个月前
0545