What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-14 22:47:12
tkinter canas can you use other fonts
from tkinter import * from tkinter import font root = Tk() root.title('Font Families') fonts=list(font.families()) fonts.sort() def populate(frame): '''Put in the fonts''' listnumber = 1 for item in fonts: label = "listlabel&quo... Add solution -
Python 2021-11-12 11:21:10
Initialize your list and read in the value of n followed by n lines of commands where each command will be of the 7 types listed above. Iterate through each command in order and perform the corresponding operation on your list.
N = int(input('Number of commands You want to Enter :')) l=[] for i in range(N): x=input().split(" ") command=x[0] if command=='insert': l.insert(int(x[1]),int(x[2])) if command=='remove': ... Add solution -
Rust 2021-11-07 09:19:32
rust sort
fn main() { let mut vec = vec![1, 5, 10, 2, 15]; vec.sort(); } Add solution -
Other 2021-11-05 08:14:22
how to run flutter pub get in flutlab
import 'package:flutter/material.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { // This widget is the root of your application. @override... Add solution -
Python 2021-10-29 23:49:13
python sort comparator
# Basic syntax: your_list.sort() # Example usage: your_list = [42, 17, 23, 111] your_list.sort() print(your_list) --> [17, 23, 42, 111] # If you have a list of numbers that are of type string, you can do the # following to sort them numerically witho... Add solution -
Python 2021-10-25 23:42:09
Find the second largest number in a list
def second_largest(numbers): if (len(numbers)<2): return if ((len(numbers)==2) and (numbers[0] == numbers[1]) ): return dup_items = set() uniq_items = [] for x in numbers: if x not in dup_items: uniq_items.append(x) d... Add solution -
Python 2021-10-23 13:08:07
3sum solution python
class Solution(object): def threeSum(self, nums): nums.sort() result = [] for i in range(len(nums)-2): if i> 0 and nums[i] == nums[i-1]:  ... Add solution