python いいね機能

class Post:
def init(self, text):
self.text = text
self.likes = 0

def show(self):
    print(f"{self.text} - {self.likes}")
def like(self):
    self.likes += 1

posts = [
Post(“Hello”),
Post(“Hi”),
]

posts[0].likes += 1

posts[0].like()

for post in posts:
post.show()

投稿者: chosuke

趣味はゲームやアニメや漫画などです

「python いいね機能」への26件のフィードバック

  1. If you asked me to point to a recent positive sign for the open web this site would be near the top, and a stop at shadowglowcorner reinforced that designation, the few sites that serve as evidence the web can still produce quality independent content are precious and this one has clearly become one for me.

  2. Picked this up while looking for something else and ended up reading every paragraph because it was actually informative, and after fashioncartworld I was sure I would come back, that does not happen often when most sites bury the useful parts under endless ads and pop ups today and across most categories online.

  3. Refreshing to read something where the words actually mean something instead of filling space, and a stop at digitalbuyarena kept that going, the writing here trusts the reader to follow along without endless repetition or constant reminders of what was already said earlier in the post which I appreciate.

  4. Appreciate the practical examples, they made the abstract points easier to grasp, and a stop at echocrestcollective added more of the same, this site clearly understands that real examples beat empty theory every single time which is the mark of a writer who knows their audience well and respects their time.

  5. Decided to set aside time later to read more carefully, and a stop at trendydealstation reinforced that decision, content that earns a calendar entry rather than just a passing read is in a different tier altogether and this site is clearly working at that elevated level which I really do appreciate as a reader today.

  6. Decided this was the best thing I had read all morning, and a stop at velvetgrovecrafts kept that ranking intact, ranking my reading is something I do mentally throughout the day and the top rank is competitive and not easily won but this site won it without needing to overstate its claims for that.

  7. Just nice to read something that does not feel like it was assembled from a content brief, and a stop at blossomhorizonstore kept that handcrafted feel going, you can tell when a real human with real understanding is behind the words versus a templated piece churned out for an algorithm to find.

  8. Really clear writing, the kind that makes you want to share the link with someone who has been asking about the topic, and a quick browse through glowforgeessentials only made me more sure of that, the information here stays useful long after the first read is done which says a lot.

  9. Decided to subscribe to the RSS feed if there is one, and a stop at moderntrendcenter confirmed that decision, content that I want delivered to me proactively rather than just remembered when I have time is content that has earned a higher level of commitment from me as a reader looking for reliable sources.

  10. Reading this with my morning coffee turned into reading the related posts with my morning coffee, and a stop at stonelightemporium stretched the morning further, content that pulls breakfast into a reading session rather than just accompanying it is content that has earned a higher claim on my attention than the average article does.

  11. Once I trust a site this much I tend to read everything they publish and that is the trajectory I am on with this one, and a stop at frostlaneemporium confirmed the trajectory, the rare progression from interested reader to comprehensive reader is something only certain sites earn and this one is earning that progression rapidly.

  12. Top notch writing, every paragraph carries weight and nothing feels like filler, and a stop at silverhorizonstore reflected that same care, a rare thing on the open web these days where most pages exist for clicks rather than actual reader value or anything close to that which is honestly a real shame.

  13. Reading this slowly to give it the attention it deserved, and a stop at freshcartcorner earned the same slow read, choosing to read slowly is a small act of respect for content quality and very few sites earn that respect from me but this one did so without any explicit ask which is the cleanest way.

  14. Speaking from the perspective of having read widely on the topic this site offers something distinct, and a look at premiumpickzone reinforced that distinctness, the rare site that contributes something genuinely original to a saturated topic is the rare site worth following carefully and this one has demonstrated that original contribution capability today.

  15. Probably this is one of the better quiet successes on the open web at the moment, and a look at dreamwovenbazaar reinforced that quiet success quality, sites that are doing well without making a noise about doing well are the sites I most respect and this one has clearly chosen the quiet success path consistently throughout.

  16. Really appreciate the confidence to make a clear point rather than hedging everything, and a quick visit to epiccartcenter maintained the same direct stance, writing that takes positions rather than equivocating is more useful even when the positions are debatable because at least the reader has something to react to clearly.

  17. Reading this prompted me to dig into a related topic later, and a stop at copperwindessentials provided some of the starting points for that follow up reading, content that triggers further exploration rather than satisfying curiosity completely is content with real generative energy and this site has plenty of that energy throughout it.

  18. Reading this with a notebook open turned out to be the right move, and a stop at silversproutstore added more material to the notes, content that justifies active note taking from a passive reader is content with real informational density and this site is producing notes worthy material at a high rate consistently.

  19. Decided to write a short note to the author if there is contact info anywhere, and a stop at infinitybuyhub extended that intention, the urge to thank the writer directly is a strong signal of content quality and this site has triggered that urge in me today which is a fairly rare event for my reading.

  20. Picked up something useful for a side project, and a look at neonpickmarket added another piece I will incorporate, content that connects to specific projects I am working on is content with practical utility and the practical utility of this site is showing up across multiple posts I have read in the last hour or so.

  21. Liked the post enough to read it twice and the second read found new things, and a stop at perfectbuycorner similarly rewarded the second look, content with hidden depths that only reveal themselves on careful rereading is the rare kind that earns lasting respect rather than fleeting first impressions only briefly held.

  22. Just wanted to drop a quick note saying this was a useful read on a topic I have been circling, no fluff, and a stop at crystalbloommarket added a few extra points that fit the same simple style which makes the whole site feel coherent rather than thrown together by many different writers with different goals.

  23. Took a quick scan first and then went back to read properly because the post deserved it, and a stop at goodslinkstore kept me reading carefully too, the kind of writing that earns a slower second pass rather than getting skimmed and forgotten is something I value highly when I happen to find it.

  24. Thanks for sharing this with the open internet rather than locking it behind a paywall like so many sites do now, and a stop at frostharbormarket kept the same vibe going, generous helpful and clearly written by someone who actually wants people to learn from it rather than just charge them.

  25. Better than the average post on this subject by some distance, and a look at windspirecollective reinforced that, you can tell within the first paragraph that the writer here actually cares about the topic rather than just covering it for the sake of having something to publish that week or that day.

  26. Took a few notes from this post, the points are easy to remember without needing to come back and check, and a look at infinitydealcenter added a couple more, the kind of place that sticks in the memory long after the browser tab has been closed for the day which says a lot really.

コメントを残す

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です