forked from Asabeneh/30-Days-Of-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,11 +19,11 @@ | |
|
||
![30DaysOfPython](../images/[email protected]) | ||
- [Day 4](#day-4) | ||
- [String](#string) | ||
- [Strings](#strings) | ||
- [Creating a String](#creating-a-string) | ||
- [String Concatenation](#string-concatenation) | ||
- [Escape Sequences in Strings](#escape-sequences-in-strings) | ||
- [String Formating](#string-formating) | ||
- [String formating](#string-formating) | ||
- [Old Style String Formating (% Operator)](#old-style-string-formating--operator) | ||
- [New Style String Formating (str.format)](#new-style-string-formating-strformat) | ||
- [String Interpolation / f-Strings (Python 3.6+)](#string-interpolation--f-strings-python-36) | ||
|
@@ -34,10 +34,10 @@ | |
- [Reversing a String](#reversing-a-string) | ||
- [Skipping Characters While Slicing](#skipping-characters-while-slicing) | ||
- [String Methods](#string-methods) | ||
- [💻 Exercises - Day 4](#%f0%9f%92%bb-exercises---day-4) | ||
- [💻 Exercises - Day 4](#-exercises---day-4) | ||
# Day 4 | ||
|
||
## String | ||
## Strings | ||
|
||
Text is a string data type. Any data type written as text is a string. Any data under single or double quote are strings. There are different string methods and built-in functions to deal with string data types. To check the length of a string use the len() method. | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
</div> | ||
</div> | ||
|
||
[<< Day 5](../04_Day_Strings/04_string.md) | [Day 6 >>](../06_Day_Tuples/06_tuple.md) | ||
[<< Day 5](../04_Day_Strings/04_strings.md) | [Day 6 >>](../06_Day_Tuples/06_tuples.md) | ||
|
||
![30DaysOfPython](../images/[email protected]) | ||
|
||
|
@@ -40,7 +40,7 @@ | |
- [Finding Index of an Item](#finding-index-of-an-item) | ||
- [Reversing a List](#reversing-a-list) | ||
- [Sorting List Items](#sorting-list-items) | ||
- [💻 Exercises: Day 5](#%f0%9f%92%bb-exercises-day-5) | ||
- [💻 Exercises: Day 5](#-exercises-day-5) | ||
|
||
# Day 5 | ||
|
||
|
@@ -599,4 +599,4 @@ ages = [19, 22, 19, 24, 20, 25, 26, 24, 25, 24] | |
|
||
🎉 CONGRATULATIONS ! 🎉 | ||
|
||
[<< Day 5](../04_Day_Strings/04_string.md) | [Day 6 >>](../06_Day_Tuples/06_tuple.md) | ||
[<< Day 5](../04_Day_Strings/04_strings.md) | [Day 6 >>](../06_Day_Tuples/06_tuples.md) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,25 +15,25 @@ | |
</div> | ||
</div> | ||
|
||
[<< Day 5](../05_Day_Lists/05_list.md) | [Day 7 >>](../07_Day_Sets/07_set.md) | ||
[<< Day 5](../05_Day_Lists/05_lists.md) | [Day 7 >>](../07_Day_Sets/07_sets.md) | ||
|
||
![30DaysOfPython](../images/[email protected]) | ||
|
||
- [Day 6:](#day-6) | ||
- [Tuple](#tuple) | ||
- [Tuples](#tuples) | ||
- [Creating a Tuple](#creating-a-tuple) | ||
- [Tuple Length](#tuple-length) | ||
- [Tuple length](#tuple-length) | ||
- [Accessing Tuple Items](#accessing-tuple-items) | ||
- [Slicing Tuples](#slicing-tuples) | ||
- [Slicing tuples](#slicing-tuples) | ||
- [Changing Tuples to Lists](#changing-tuples-to-lists) | ||
- [Checking an Item in a List](#checking-an-item-in-a-list) | ||
- [Joining Tuples](#joining-tuples) | ||
- [Deleting Tuples](#deleting-tuples) | ||
- [💻 Exercises: Day 6](#%f0%9f%92%bb-exercises-day-6) | ||
- [💻 Exercises: Day 6](#-exercises-day-6) | ||
|
||
# Day 6: | ||
|
||
## Tuple | ||
## Tuples | ||
|
||
A tuple is a collection of different data types which is ordered and unchangeable (immutable). Tuples are written with round brackets, (). Once a tuple is created, we cannot change its values. We cannot use add, insert, remove methods in a tuple because it is not modifiable (mutable). Unlike list, tuple has few methods. Methods related to tuples: | ||
|
||
|