Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 20ad824

Browse files
author
kana800
committed
added table of content
1 parent 301b248 commit 20ad824

File tree

1 file changed

+53
-4
lines changed

1 file changed

+53
-4
lines changed

‎README.md

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,54 @@
11
# Python Cheatsheet
22

3+
# Table of Content
4+
5+
6+
<!-- vim-markdown-toc GFM -->
7+
8+
* [Main](#main)
9+
* [Basic and necessary commands needed to execute a well-defined python code at the command line.](#basic-and-necessary-commands-needed-to-execute-a-well-defined-python-code-at-the-command-line)
10+
* [Opening a python shell.](#opening-a-python-shell)
11+
* [Installing a package](#installing-a-package)
12+
* [Running a python script](#running-a-python-script)
13+
* [Calculating the time of execution](#calculating-the-time-of-execution)
14+
* [Importing a py script](#importing-a-py-script)
15+
* [Getting started with the language](#getting-started-with-the-language)
16+
* [Basic I/O](#basic-io)
17+
* [Variables and Constants](#variables-and-constants)
18+
* [Conditional Statements](#conditional-statements)
19+
* [Iterative statements](#iterative-statements)
20+
* [String formatting](#string-formatting)
21+
* [Function](#function)
22+
* [Function Call](#function-call)
23+
* [Data Structures](#data-structures)
24+
* [Lists](#lists)
25+
* [Dictionaries](#dictionaries)
26+
* [Tuple](#tuple)
27+
* [Changing Tuple Values](#changing-tuple-values)
28+
* [Creating tuple with one item](#creating-tuple-with-one-item)
29+
* [Deleting a tuple](#deleting-a-tuple)
30+
* [Pandas](#pandas)
31+
* [NLTK](#nltk)
32+
* [Errors and Exceptions](#errors-and-exceptions)
33+
* [Exceptions](#exceptions)
34+
* [Python Snippets](#python-snippets)
35+
* [Anagrams](#anagrams)
36+
* [Memory](#memory)
37+
* [Print a string N times](#print-a-string-n-times)
38+
* [Chunk](#chunk)
39+
* [Get vowels](#get-vowels)
40+
* [Length of Last Word in a string](#length-of-last-word-in-a-string)
41+
* [Valid Palindrome](#valid-palindrome)
42+
* [Check Lowercase](#check-lowercase)
43+
* [Count Negatives in a sorted Matrix](#count-negatives-in-a-sorted-matrix)
44+
* [Write to file](#write-to-file)
45+
* [Median of given array](#median-of-given-array)
46+
* [Even or Odd](#even-or-odd)
47+
* [Palindrome](#palindrome)
48+
49+
<!-- vim-markdown-toc -->
50+
51+
352
## Main
453
```python
554
if __name__ == '__main__': # If file is not imported, this will be executed
@@ -161,7 +210,7 @@ def getPerson(name, age) :
161210
return person
162211
```
163212

164-
#### Function Call
213+
### Function Call
165214
Functions can be called by passing the arguments according to the declaration.
166215
```python
167216
a = 20
@@ -260,7 +309,7 @@ del this_tuple
260309
print(this_tuple) # ERROR: this_tuple is not defined
261310
## Third party libraries
262311
```
263-
### Pandas
312+
## Pandas
264313
```shell
265314
$ sudo pip3 install pandas # Installing pandas module in Ubuntu
266315
```
@@ -272,7 +321,7 @@ import pandas as pd
272321
<dataframe>.info() # Gives some information like, row and column datatypes, non-null count, and memory usage
273322
<dataframe>.describe() # Provides some descriptive statistics about the numerical rows in the dataframe
274323
```
275-
### NLTK
324+
## NLTK
276325
```shell
277326
$ sudo pip3 install nltk # Installing nltk module in Ubuntu
278327
```
@@ -288,7 +337,7 @@ nltk.download('averaged_perceptron_tagger')
288337
Program stops working on error Python raises exceptions when it encounter error.
289338
To avoid this, `try-catch` blocks are used.
290339

291-
# Exceptions
340+
### Exceptions
292341
No syntax errors found, program starts execution.
293342
Errors detected during execution are called exceptions.
294343
Use try: except: finally: to catch and handle the exceptions.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /