Skip to main content
>>list_numbers = [12,6,8,78]
>>list_numbers[::-1]
[78, 8, 6, 12] # Reverse a List
>>list_numbers[-1:]
[78]
>>list_numbers[:-1]
[12, 6, 8] #Remove a last number
>>list_numbers[-1::]
[78]
>>list_numbers[-2::]
[8, 78] # Last Two Element
>>list_numbers[:-2]
[12, 6]

###########################################

Two List match one to end
list_b = [5, 6, 7, 8,34]
list_a = [1, 2, 3, 4, 90,80]
c = map(lambda x,y:[x,y],list_a,list_b)

for i in c:
    print(i)

Comments

Popular posts from this blog

My First Game Application.........

APK file Link

Particle Js Example

Particle Js Example  it is state foreword example we just need to changes in .html , .css And Very Importantly .Json File 1.html file(Index.html file) : <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <meta http-equiv="X-UA-Compatible" content="ie=edge">   <title>Particles Login</title>   <link rel="stylesheet" href="style.css"> </head> <body>   <div id="particles-js">      </div>   <script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>   <script>     particlesJS.load('particles-js', 'particles.json', function(){       console.log('particles.json loaded...');     });   </script> </body> </html>  2