Skip to content

Commit b2885a9

Browse files
committed
Created using Colaboratory
1 parent 7b30643 commit b2885a9

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

regex_python.ipynb

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 0,
4+
"metadata": {
5+
"colab": {
6+
"provenance": [],
7+
"authorship_tag": "ABX9TyPUwM8AW8tkbFOUcwpIxjXJ",
8+
"include_colab_link": true
9+
},
10+
"kernelspec": {
11+
"name": "python3",
12+
"display_name": "Python 3"
13+
},
14+
"language_info": {
15+
"name": "python"
16+
}
17+
},
18+
"cells": [
19+
{
20+
"cell_type": "markdown",
21+
"metadata": {
22+
"id": "view-in-github",
23+
"colab_type": "text"
24+
},
25+
"source": [
26+
"<a href=\"https://colab.research.google.com/github/Sinrez/PythonProjects/blob/main/regex_python.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
27+
]
28+
},
29+
{
30+
"cell_type": "code",
31+
"execution_count": 1,
32+
"metadata": {
33+
"colab": {
34+
"base_uri": "https://localhost:8080/",
35+
"height": 35
36+
},
37+
"id": "99R3EnM9Arl5",
38+
"outputId": "7c74b3e3-9a2f-49c3-8e73-0a2fac8f7d29"
39+
},
40+
"outputs": [
41+
{
42+
"output_type": "execute_result",
43+
"data": {
44+
"text/plain": [
45+
"'C:\\\\file.txt'"
46+
],
47+
"application/vnd.google.colaboratory.intrinsic+json": {
48+
"type": "string"
49+
}
50+
},
51+
"metadata": {},
52+
"execution_count": 1
53+
}
54+
],
55+
"source": [
56+
"common_string = 'C:\\file.txt' # Обычная строка\n",
57+
"raw_string = r'C:\\file.txt' # Сырая строка\n",
58+
"raw_string"
59+
]
60+
},
61+
{
62+
"cell_type": "code",
63+
"source": [
64+
"# Используем 2 префикса одновременно:\n",
65+
"raw_f_string = rf'C:\\file.txt'\n",
66+
"f_raw_string = fr'C:\\file.txt'\n",
67+
"print(raw_f_string)\n",
68+
"print(f_raw_string )"
69+
],
70+
"metadata": {
71+
"colab": {
72+
"base_uri": "https://localhost:8080/"
73+
},
74+
"id": "UXsGG6CmA6Mt",
75+
"outputId": "29dd02cf-7808-45ca-80b1-59fdf74c9ce1"
76+
},
77+
"execution_count": 4,
78+
"outputs": [
79+
{
80+
"output_type": "stream",
81+
"name": "stdout",
82+
"text": [
83+
"C:\\file.txt\n",
84+
"C:\\file.txt\n"
85+
]
86+
}
87+
]
88+
},
89+
{
90+
"cell_type": "code",
91+
"source": [],
92+
"metadata": {
93+
"id": "rYUuixD_BNzN"
94+
},
95+
"execution_count": null,
96+
"outputs": []
97+
}
98+
]
99+
}

0 commit comments

Comments
 (0)