small changes

This commit is contained in:
Kovács Bence János 2020-03-29 17:36:55 +02:00
parent bc99060d11
commit babfab8ede

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
# IDE JÖNNEK IMPORTOK
import random
import string
@ -22,7 +21,6 @@ class MessageSender:
"""
Inicializálja az osztályt.
"""
self.id = 0
pass
@ -32,20 +30,19 @@ class MessageSender:
return ''.join(random.choice(letters) for i in range(stringLength))
def CreateMessage(self, p) -> str:
def createMessage(self, p) -> str:
"""
Ez egy metodus
:param szam:
:param szoveg:
:return: str tipus
"""
self.id += random.randrange(10000)
data = self.randomString(p)
return str(self.id) + " " + str(data)
return str(data)
pass
if __name__ == "__main__":
temp = MessageSender()
print(temp.CreateMessage(20))
print(temp.createMessage(20))