DEV Community

Miss Pooja Anilkumar Patel
Miss Pooja Anilkumar Patel

Posted on

1323. Leetcode Solution in Python3

class Solution:
  def maximum69Number(self, num: int) -> int:
    return int(str(num).replace('6', '9', 1)
Enter fullscreen mode Exit fullscreen mode

leetcode

challenge

Here is the link for the problem:
https://leetcode.com/problems/maximum-69-number/

Top comments (0)