What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-14 05:39:10
reverse a number in python
# Python string/number reverser example_number = 12143 example_string = "Hello there" def reverse(thing): thing = str(thing) # convert it to a string, just in case it was a number list_of_chars = [char for char in thing] reversed_l... Add solution -
Python 2021-11-03 00:39:17
what is Python's dynamic type system
Python is strongly, dynamically typed. Strong typing means that the type of a value doesn't change in unexpected ways. A string containing only digits doesn't magically become a number, as may happen in Perl. Every change of type requires an explicit con... Add solution -
Python 2021-10-31 01:35:10
capitalize python
# Python string capitalization string = "this isn't a #Standard Sntence." string.capitalize() # "This isn't a #standard sentence." string.upper() # "THIS ISN'T A #STANDARD SENTENCE." string.lower() # "this isn't a #stand... Add solution -
Python 2021-10-28 19:33:12
time current time python time.time
"""Imports the datetime package from the Python library""" from datetime import datetime """Sets the variable now to the current date and time""" now = datetime.now() """The vari... Add solution -
Python 2021-10-27 21:51:13
how to find palingrams python
""" Program: Python program to find anagrams in a list of strings """ from collections import Counter def get_anagrams(input_string_list, test_string): print("*******************") print("input_str... Add solution -
TypeScript 2021-10-20 15:49:05
difference between arrays and lists in python
lists and arrays are used in Python to store data(any data type- strings, integers etc), both can be indexed and iterated also. ... Arrays need to be declared whereas lists do not need declaration because they are a part of Python's syntax. This is the re... Add solution