<p>You are given two strings <code>s1</code> and <code>s2</code> of equal length. A <strong>string swap</strong> is an operation where you choose two indices in a string (not necessarily different) and swap the characters at these indices.</p>

<p>Return <code>true</code> <em>if it is possible to make both strings equal by performing <strong>at most one string swap </strong>on <strong>exactly one</strong> of the strings. </em>Otherwise, return <code>false</code>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre>
<strong>Input:</strong> s1 = &quot;bank&quot;, s2 = &quot;kanb&quot;
<strong>Output:</strong> true
<strong>Explanation:</strong> For example, swap the first character with the last character of s2 to make &quot;bank&quot;.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre>
<strong>Input:</strong> s1 = &quot;attack&quot;, s2 = &quot;defend&quot;
<strong>Output:</strong> false
<strong>Explanation:</strong> It is impossible to make them equal with one string swap.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre>
<strong>Input:</strong> s1 = &quot;kelb&quot;, s2 = &quot;kelb&quot;
<strong>Output:</strong> true
<strong>Explanation:</strong> The two strings are already equal, so no string swap operation is required.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s1.length, s2.length &lt;= 100</code></li>
	<li><code>s1.length == s2.length</code></li>
	<li><code>s1</code> and <code>s2</code> consist of only lowercase English letters.</li>
</ul>

class Solution:
    def areAlmostEqual(self, s1: str, s2: str) -> bool:
        if(s1 == s2):
            return True
        str_len = len(s1)
        s1 = list(s1)
        s2 = list(s2)
        i = 0
        pos1 = -1
        pos2 = -1
        count = 0
        flag = 0
        while(i < str_len):
            if(s1[i] != s2[i]):
                count += 1
            if(count == 1 and pos1 == -1):
                pos1 = i
            elif(count == 2 and pos2 == -1):
                pos2 = i
            elif(count > 2):
                flag = 1
                break
            i += 1
        if(flag == 1 or count == 1):
            return False
        else:
            print(pos1, pos2)
            s1[pos1], s1[pos2] = s1[pos2], s1[pos1]
            if(s1 == s2):
                return True
            else:
                return False
31