Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kurs_alx_pcz
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
kurs_alx_pcz
Commits
8f83f6f7
Commit
8f83f6f7
authored
Nov 28, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sortowanie z localami
parent
8cea2c2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
sortowanie_tekstow.py
dzien4/zadania/sortowanie_tekstow.py
+2
-2
No files found.
dzien4/zadania/sortowanie_tekstow.py
View file @
8f83f6f7
...
@@ -23,7 +23,7 @@ print('Posortowane 1:', lista)
...
@@ -23,7 +23,7 @@ print('Posortowane 1:', lista)
# 1) ustawić język porównywania tekstów w ustawieniach regionalnych
# 1) ustawić język porównywania tekstów w ustawieniach regionalnych
import
locale
import
locale
print
(
'Lokale przed ustawieniem:'
,
locale
.
getlocale
(
locale
.
LC_COLLATE
))
print
(
'Lokale przed ustawieniem:'
,
locale
.
getlocale
(
locale
.
LC_COLLATE
))
locale
.
setlocale
(
locale
.
LC_COLLATE
,
'pl_PL'
)
locale
.
setlocale
(
locale
.
LC_COLLATE
,
'pl_PL
.utf8
'
)
# to by oznaczało: użyj ustawień systemowych
# to by oznaczało: użyj ustawień systemowych
# locale.setlocale(locale.LC_COLLATE, '')
# locale.setlocale(locale.LC_COLLATE, '')
print
(
'Lokale po ustawieniu:'
,
locale
.
getlocale
(
locale
.
LC_COLLATE
))
print
(
'Lokale po ustawieniu:'
,
locale
.
getlocale
(
locale
.
LC_COLLATE
))
...
@@ -39,7 +39,7 @@ print('Posortowane 2:', lista)
...
@@ -39,7 +39,7 @@ print('Posortowane 2:', lista)
while
True
:
while
True
:
s
=
input
(
'Podaj nr pozycji: '
)
s
=
input
(
'Podaj nr pozycji: '
)
if
s
.
lower
()
==
'koniec'
:
if
s
.
lower
()
==
'koniec'
or
not
s
:
break
break
try
:
try
:
i
=
int
(
s
)
i
=
int
(
s
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment