Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.
ExampleGet your own Python Server def my_function(): print("Hello from a function") my_function() Try it Yourself » Related Pages Python Functions Tutorial Function Function Arguments *args Keyword Arguments **kwargs Default Parameter Value Passing a List as an Argument Function Return Value...
Pythonfrozenset()Function ❮ Built-in Functions Example Freeze the list, and make it unchangeable: mylist = ['apple','banana','cherry'] x =frozenset(mylist) Try it Yourself » Definition and Usage Thefrozenset()function returns an unchangeable frozenset object (which is like asetobject, on...
Example Return a list of all collections in your database: print(mydb.list_collection_names()) Run example » Or you can check a specific collection by name: Example Check if the "customers" collection exists: collist = mydb.list_collection_names() ...
❮ Built-in Functions ExampleGet your own Python Server Reverse the sequence of a list, and print each item: alph = ["a", "b", "c", "d"]ralph = reversed(alph)for x in ralph: print(x) Try it Yourself » Definition and UsageThe reversed() function returns a reversed iterator...
❮ Built-in Functions ExampleReturn the unique id of a tuple object:x = ('apple', 'banana', 'cherry')y = id(x) Try it Yourself » Definition and UsageThe id() function returns a unique id for the specified object.All objects in Python has its own unique id....
Python MongoDBMongoDB Get Started MongoDB Create DB MongoDB Collection MongoDB Insert MongoDB Find MongoDB Query MongoDB Sort MongoDB Delete MongoDB Drop Collection MongoDB Update MongoDB Limit Python ReferencePython Overview Python Built-in Functions Python String Methods Python List Methods Python ...
Here is the code in Python:Example import pandas as pdimport matplotlib.pyplot as pltfrom scipy import statsfull_health_data = pd.read_csv("data.csv", header=0, sep=",") x = full_health_data["Duration"]y = full_health_data ["Calorie_Burnage"]slope, intercept, r, p, std_err = ...