What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-22 04:09:03
array javascript
//Creating a list var fruits = ["Apple", "Banana", "Cherry"]; //Creating an empty list var books = []; //Getting element of list //Lists are ordered using indexes //The first element in an list has an index of 0, //the sec... Add solution -
Python 2021-10-09 05:20:09
BeautifulSoup - scraping paragraphs from html
from bs4 import BeautifulSoup # Simple HTML SIMPLE_HTML = '''<html> <head></head> <body> <h1>This is a title</h1> <p class="subtitle">Lorem ipsum dolor sit amet.</p> <p>Here's another p with... Add solution -
Python 2021-10-03 10:09:03
how to group lists per index in python
# initializing the list lists = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] # empty list result = [] # variable to 0 index = 0 # iterating over the sub_list length (3) times for i in range(len(lists[0])): # appending an empty sub_list resu... Add solution -
Python 2021-10-03 09:38:08
rotate matrix 90 degrees clockwise in python
#The program defines the square matrix 90 degrees clockwise direction. m,n = map(int,input().split()) #m,n are the number of rows and columns. #m = int(input('rows')) l = [] for i in range(m): x = list(map(int,input().split())) #for taking the rows a ... Add solution -
Python 2021-10-01 14:14:05
stack program in python 3
>>> myStack = [] >>> myStack.append('a') >>> myStack.append('b') >>> myStack.append('c') >>> myStack ['a', 'b', 'c'] >>> myStack.pop() 'c' >>> myStack.pop() 'b' >>> myStack.pop() '... Add solution -
C# 2021-10-01 10:13:03
select a object from list based on a value csharp
// this will return the first correct answer, // or throw an exception if there are no correct answers var correct = answers.First(a => a.Correct); // this will return the first correct answer, // or null if there are no correct answers var correct ... Add solution
Best helpers
Ranking is empty