Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Florestan Biaux
Messenger Statistics
Commits
a1a0ecb6
Commit
a1a0ecb6
authored
Jul 21, 2021
by
Florestan Biaux
💬
Browse files
creation usertab() pour obtenir un tableau avec les participants de la conversation
parent
4a185c3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
main.py
View file @
a1a0ecb6
...
...
@@ -17,4 +17,4 @@ if __name__ == "__main__":
if
choice
==
1
:
print
(
data
)
if
choice
==
2
:
print
(
users
.
user
list
(
data
))
print
(
users
.
user
tab
(
data
))
users.py
View file @
a1a0ecb6
...
...
@@ -6,8 +6,15 @@ def userlist(data):
userlist
=
userlist
.
replace
(
"name"
,
""
)
userlist
=
userlist
.
replace
(
"["
,
""
)
userlist
=
userlist
.
replace
(
"]"
,
""
)
userlist
=
userlist
.
replace
(
"'"
,
'"'
)
userlist
=
userlist
.
replace
(
"'"
,
""
)
userlist
=
userlist
.
replace
(
'""'
,
""
)
userlist
=
userlist
.
replace
(
'{:'
,
""
)
userlist
=
userlist
.
replace
(
'}'
,
""
)
return
decode
.
string_decode
(
userlist
)
def
usertab
(
data
):
usertab
=
userlist
(
data
).
split
(
','
)
for
i
in
range
(
len
(
usertab
)):
usertab
[
i
]
=
str
(
usertab
[
i
]).
strip
()
return
usertab
\ No newline at end of file
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