---
title: "!=(_:_:)"
framework: swift
role: symbol
role_heading: Operator
path: "swift/!=(_:_:)-3nrcc"
---

# !=(_:_:)

Returns a Boolean value indicating whether any corresponding components of the two tuples are not equal.

## Declaration

```swift
func != <A, B, C, D, E, F>(lhs: (A, B, C, D, E, F), rhs: (A, B, C, D, E, F)) -> Bool where A : Equatable, B : Equatable, C : Equatable, D : Equatable, E : Equatable, F : Equatable
```

## Parameters

- `lhs`: A tuple of Equatable elements.
- `rhs`: Another tuple of elements of the same type as lhs.

## Discussion

Discussion For two tuples to compare as equal, each corresponding pair of components must be equal. The following example compares tuples made up of 6 components: let a = ("a", 1, 2, 3, 4, 5) let b = ("a", 1, 2, 3, 4, 5) print(a != b) // Prints "false"

let c = ("a", 1, 2, 3, 4, 6) print(a != c) // Prints "true"

## See Also

### Tuple Comparison

- [==(_:_:)](swift/==(_:_:)-958in.md)
- [==(_:_:)](swift/==(_:_:)-2htbb.md)
- [==(_:_:)](swift/==(_:_:)-h88g.md)
- [==(_:_:)](swift/==(_:_:)-7lhq7.md)
- [==(_:_:)](swift/==(_:_:)-1hbor.md)
- [==(_:_:)](swift/==(_:_:)-1ud2a.md)
- [==(_:_:)](swift/==(_:_:)-9kf9y.md)
- [!=(_:_:)](swift/!=(_:_:)-18co7.md)
- [!=(_:_:)](swift/!=(_:_:)-7er1l.md)
- [!=(_:_:)](swift/!=(_:_:)-754t2.md)
- [!=(_:_:)](swift/!=(_:_:)-7ao4l.md)
- [!=(_:_:)](swift/!=(_:_:)-4fzl6.md)
- [!=(_:_:)](swift/!=(_:_:)-1mxms.md)
