This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [2]: a = 'This is a string' | |
In [3]: print(a) | |
This is a string | |
In [4]: a = 10 | |
In [5]: print(a) | |
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
const char a[] = "this is a string"; | |
printf("%s\n", a); | |
a = 10; | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: l = [1, 2, 3, 4, 5] | |
In [2]: type(l) | |
Out[2]: list | |
In [3]: l[0] | |
Out[3]: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: d = {'first_value': 1, 'second_value': 2} | |
In [2]: type(d) | |
Out[2]: dict | |
In [3]: d['fist_value'] | |
Out[3]: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: s = {1, 2, 3, 4} | |
In [2]: type(s) | |
Out[2]: set | |
In [3]: s = {1, 10, 1, 3, 4} | |
In [4]: s | |
Out[4]: {1, 3, 4, 10} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: t = (1, 2, 3, 4) | |
In [2]: t[0] | |
Out[2]: 1 | |
In [3]: t[0] = 10 | |
TypeError Traceback (most recent call last) | |
<ipython-input-4-88963aa635fa> in <module>() | |
1 t[0] = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: l = list() | |
In [2]: type(l) | |
Out[2]: list | |
In [3]: l | |
Out[3]: [] | |
In [4]: l.append(10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: l = [10, 'python-list', 1, 2, 3, 4, 5, [1, 2, 3, 4, 5]] | |
In [2]: l | |
Out[2]: [10, 'python-list', 1, 2, 3, 4, 5, [1, 2, 3, 4, 5]] | |
In [3]: l[0] | |
Out[3]: 10 | |
In [4]: l[1] | |
Out[4]: 'python-list' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " required | |
filetype off " required | |
" Enable folding | |
set foldmethod=indent | |
set foldlevel=99 | |
" Enable folding with the spacebar | |
nnoremap <space> za | |
" Line Number | |
set number |